package com.hnevc.yinqi;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

public class StartActivity extends AppCompatActivity {

    private Button tOneBtn;
    private Button tTwoBtn;
    private Button tTreeBtn;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.start_activity_layout);
        initView();
        initData();
        initEvent();
    }

    private void initView() {
        tOneBtn = findViewById(R.id.t_one);
        tTwoBtn = findViewById(R.id.t_two);
        tTreeBtn = findViewById(R.id.t_tree);
    }

    private void initData() {

    }

    private void initEvent() {
        //第一题题目 页面跳转
        tOneBtn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                        Intent intent = new Intent(StartActivity.this,MainActivity.class);
                        startActivity(intent);
                    }
                });
        //第二题题目 页面跳转
        tTwoBtn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent1 = new Intent(StartActivity.this,TwoActivity.class);
                startActivity(intent1);
            }
        });
        //第三题题目 页面跳转
        tTreeBtn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                Intent intent2 = new Intent(StartActivity.this,Activity3.class);
                startActivity(intent2);
            }
        });
    }
}
